1. Technical Field
The present invention relates generally to data processing, and in particular, to memory access operations. Still more particularly, the present invention relates to a data processing system, processor and method of data processing that supports processing of program code exhibiting differing memory models.
2. Description of the Related Art
A conventional symmetric multiprocessor (SMP) computer system, such as a server computer system, includes multiple processing units all coupled to a system interconnect, which typically comprises one or more address, data and control buses. Coupled to the system interconnect is a system memory, which represents the lowest level of volatile memory in the multiprocessor computer system and which generally is accessible for read and write access by all processing units. In order to reduce access latency to instructions and data residing in the system memory, each processing unit is typically further supported by a respective multi-level cache hierarchy, the lower level(s) of which may be shared by one or more processor cores.
Cache memories are commonly utilized to temporarily buffer memory blocks that might be accessed by a processor in order to speed up processing by reducing access latency introduced by having to load needed data and instructions from memory. In some multiprocessor (MP) systems, the cache hierarchy includes at least two levels. The level one (L1), or upper-level cache is usually a private cache associated with a particular processor core and cannot be accessed by other cores in an MP system. Typically, in response to a memory access instruction such as a load or store instruction, the processor core first accesses the directory of the upper-level cache. If the requested memory block is not found in the upper-level cache, the processor core then access lower-level caches (e.g., level two (L2) or level three (L3) caches) for the requested memory block. The lowest level cache (e.g., L3) is often shared among several processor cores.
In such data processing systems, it is typical that the memory subsystem and associated access logic supports only a single memory model, that is, a single set of rules regarding the ordering that must be observed between memory modifying operations (e.g., store operations) executed within the same processing unit and different processing units. For example, some architectures enforce so-called “strong” ordering between stores, meaning that the store operations of each processor core must be performed by the memory subsystem according to the program order of the associated store instructions executed by the processor core. Other architectures permit so called “weak” ordering between stores, meaning that the store operations of each processor core are permitted to be performed out-of-order with respect to the program order of the associated store instruction executed by the processor core. Because program code is generally written assuming a particular memory model, differences between memory models implemented by different data processing systems can prevent program code from being easily ported between systems implementing diverse memory models.